class PercentageCommissionPolicy extends CommissionPolicy{
    BigDecimal commissionPercentage

    String toString(){
        return "百分比提成--$name"
    }

    static constraints = {
        commissionPercentage(range:0..1)
    }

    public BigDecimal calculateCommission(JobItem jobItem) {
        return (commissionPercentage*jobItem.value).setScale(2);
    }


}
